#include "TraficLight.h"

TraficLight::TraficLight() : RoadSign() {}

TraficLight::TraficLight(int ID,float x,float y,float orientation, char type,EModel model) : RoadSign(ID,x,y,orientation,type,model) {
	this->color = 0;
	this->delay = 0;
}

int TraficLight::getColor() const{
	return this->color;
}

void TraficLight::setColor(int color){
	this->color = color;
	switch (color) {
		case 0 :
			this->model = MODEL_TRAFICLIGHT_RED;
			break;
		case 1 :
			this->model = MODEL_TRAFICLIGHT_ORANGE;
			break;
		case 2 :
			this->model = MODEL_TRAFICLIGHT_GREEN;
			break;
	}
}

int TraficLight::getDelay() const{
	return this->delay;
}

void TraficLight::setDelay(int delay){
	this->delay = delay;
}

void TraficLight::toString() {
    cout << " TraficLight : " << this->id;
    this->position->toString();
    cout << endl;
}

